package com.sp2p.dao.admin;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Map;

import com.shove.Convert;
import com.sp2p.database.Dao;
import com.sp2p.database.Dao.Tables;

public class ConpanyDao {
	/**
	 * @param conn
	 * @param paramMap
	 * @return
	 * @throws SQLException
	 */
	public long addConpany(Connection conn, Map<String, String> paramMap) throws SQLException {
		Dao.Tables.t_conpany  table = new Dao().new Tables().new t_conpany();
		table.userId.setValue(paramMap.get("userId"));
		table.companyName.setValue(paramMap.get("companyName"));
		table.registeraddress.setValue(paramMap.get("registeraddress"));
		table.corporateName.setValue(paramMap.get("corporateName"));
		table.headcount.setValue(paramMap.get("headcount"));
		table.operationTime.setValue(paramMap.get("operationTime"));
		table.competity.setValue(paramMap.get("competity"));
		table.companyType.setValue(paramMap.get("companyType"));
		table.registerAssets.setValue(paramMap.get("registerAssets"));
		table.saleIncome.setValue(paramMap.get("saleIncome"));
		table.experience.setValue(paramMap.get("experience"));
		table.site.setValue(paramMap.get("site"));
		table.shareholderInfo.setValue(paramMap.get("shareholderInfo"));
		
		return table.insert(conn);
	}
}


